/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.discount.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 商店管理Entity
 * @author czp
 * @version 2018-07-08
 */
@Table(name="discount_shop", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="shop_name", attrName="shopName", label="商店名", queryType=QueryType.LIKE),
		@Column(name="area", attrName="area", label="区域"),
		@Column(name="address", attrName="address", label="详细地址"),
		@Column(name="mall_id", attrName="mallId", label="商场名"),
		@Column(name="lon", attrName="lon", label="经度"),
		@Column(name="lat", attrName="lat", label="纬度"),
		@Column(name="contact_name", attrName="contactName", label="联系人名", queryType=QueryType.LIKE),
		@Column(name="contact_phone", attrName="contactPhone", label="联系电话"),
		@Column(name="photo_path", attrName="photoPath", label="商店图片"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class DiscountShop extends DataEntity<DiscountShop> {
	
	private static final long serialVersionUID = 1L;
	private String shopName;		// 商店名
	private String area;		// 区域
	private String address;		// 详细地址
	private String mallId;		// 商场名
	private Double lon;		// 经度
	private Double lat;		// 纬度
	private String contactName;		// 联系人名
	private String contactPhone;		// 联系电话
	private String photoPath;		// 商店图片
	
	public DiscountShop() {
		this(null);
	}

	public DiscountShop(String id){
		super(id);
	}
	
	@NotBlank(message="商店名不能为空")
	@Length(min=0, max=64, message="商店名长度不能超过 64 个字符")
	public String getShopName() {
		return shopName;
	}

	public void setShopName(String shopName) {
		this.shopName = shopName;
	}
	
	@NotBlank(message="区域不能为空")
	@Length(min=0, max=64, message="区域长度不能超过 64 个字符")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}
	
	@NotBlank(message="详细地址不能为空")
	@Length(min=0, max=255, message="详细地址长度不能超过 255 个字符")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@NotBlank(message="商场名不能为空")
	@Length(min=0, max=64, message="商场名长度不能超过 64 个字符")
	public String getMallId() {
		return mallId;
	}

	public void setMallId(String mallId) {
		this.mallId = mallId;
	}
	
	@NotNull(message="经度不能为空")
	public Double getLon() {
		return lon;
	}

	public void setLon(Double lon) {
		this.lon = lon;
	}
	
	@NotNull(message="纬度不能为空")
	public Double getLat() {
		return lat;
	}

	public void setLat(Double lat) {
		this.lat = lat;
	}
	
	@NotBlank(message="联系人名不能为空")
	@Length(min=0, max=30, message="联系人名长度不能超过 30 个字符")
	public String getContactName() {
		return contactName;
	}

	public void setContactName(String contactName) {
		this.contactName = contactName;
	}
	
	@NotBlank(message="联系电话不能为空")
	@Length(min=0, max=11, message="联系电话长度不能超过 11 个字符")
	public String getContactPhone() {
		return contactPhone;
	}

	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}
	
	@NotBlank(message="商店图片不能为空")
	@Length(min=0, max=255, message="商店图片长度不能超过 255 个字符")
	public String getPhotoPath() {
		return photoPath;
	}

	public void setPhotoPath(String photoPath) {
		this.photoPath = photoPath;
	}
	
}